package cn.kgc.spring03.service.impl;

import cn.kgc.spring03.mapper.UserMapper;
import cn.kgc.spring03.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/4/27
 * @Description:
 * id =  userServiceImpl
 */
@Service("userService2")
public class UserServiceImpl2 implements UserService {

    @Autowired
    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public String method1() {
        System.out.println("UserServiceImpl2 method1() ");
        Integer line =  userMapper.add();
        return line+"";
    }
}
